﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JacOS.Programs
{
    class settings
    {
        public static void run()
        {
            //Set up text color
            Console.Write("\nEnter the desired text color >> ");
            var color = Console.ReadLine();
            if (color == "red")
                Console.ForegroundColor = ConsoleColor.Red;
            if (color == "orange")
                Console.ForegroundColor = ConsoleColor.Cyan;
            if (color == "yellow")
                Console.ForegroundColor = ConsoleColor.Yellow;
            if (color == "green")
                Console.ForegroundColor = ConsoleColor.Green;
            if (color == "blue")
                Console.ForegroundColor = ConsoleColor.Blue;
            if (color == "purple")
                Console.ForegroundColor = ConsoleColor.DarkMagenta;
            if (color == "black")
                Console.ForegroundColor = ConsoleColor.Black;
            if (color == "white")
                Console.ForegroundColor = ConsoleColor.White;

            //Set up background color
            Console.Write("Enter a highlight color for text >> ");
            var hcolor = Console.ReadLine();

            if (hcolor == "red")
                Console.BackgroundColor = ConsoleColor.Red;
            if (hcolor == "orange")
                Console.BackgroundColor = ConsoleColor.Cyan;
            if (hcolor == "yellow")
                Console.BackgroundColor = ConsoleColor.Yellow;
            if (hcolor == "green")
                Console.BackgroundColor = ConsoleColor.Green;
            if (hcolor == "blue")
                Console.BackgroundColor = ConsoleColor.Blue;
            if (hcolor == "purple")
                Console.BackgroundColor = ConsoleColor.DarkMagenta;
            if (hcolor == "black")
                Console.BackgroundColor = ConsoleColor.Black;
            if (hcolor == "white")
                Console.BackgroundColor = ConsoleColor.White;

    //Allow the user to see the dafault user password
        Prompt:
            Console.Write("\nDo you want to see the standard user password? y/n  >>  ");
            var yesno = Console.ReadLine();
            if (yesno == "y")
            {
                Console.Write(users.user.password);
            }
            else if (yesno == "n")
            {
                //Do nothing
            }
            else
            {
                goto Prompt;
            }
        }
    }
}
